Skip to content

ReplaySubject() constructor

Defined in

Type: ReplaySubject Namespace: System.Reactive.Subjects Assembly: System.Reactive.dll

Applies to

netstandard2.0

Overloads

  • 1. public ReplaySubject()
  • 2. public ReplaySubject(IScheduler scheduler)
  • 3. public ReplaySubject(int bufferSize)
  • 4. public ReplaySubject(int bufferSize, IScheduler scheduler)
  • 5. public ReplaySubject(TimeSpan window)
  • 6. public ReplaySubject(TimeSpan window, IScheduler scheduler)
  • 7. public ReplaySubject(int bufferSize, TimeSpan window)
  • 8. public ReplaySubject(int bufferSize, TimeSpan window, IScheduler scheduler)

1. Overload

public ReplaySubject()

Summary: Initializes a new instance of the ReplaySubject class.

2. Overload

public ReplaySubject(IScheduler scheduler)

Summary: Initializes a new instance of the ReplaySubject class with the specified scheduler.

Parameters

NameTypeDescription
scheduler[IScheduler](#Scheduler the observers are invoked on.

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler is null.

3. Overload

public ReplaySubject(int bufferSize)

Summary: Initializes a new instance of the ReplaySubject class with the specified buffer size.

Parameters

NameTypeDescription
bufferSizeintMaximum element count of the replay buffer.

Exceptions

TypeCondition
System.ArgumentOutOfRangeExceptionbufferSize is less than zero.

4. Overload

public ReplaySubject(int bufferSize, IScheduler scheduler)

Summary: Initializes a new instance of the ReplaySubject class with the specified buffer size and scheduler.

Parameters

NameTypeDescription
bufferSizeintMaximum element count of the replay buffer.
scheduler[IScheduler](#Scheduler the observers are invoked on.

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler is null.
System.ArgumentOutOfRangeExceptionbufferSize is less than zero.

5. Overload

public ReplaySubject(TimeSpan window)

Summary: Initializes a new instance of the ReplaySubject class with the specified window.

Parameters

NameTypeDescription
windowTimeSpanMaximum time length of the replay buffer.

Exceptions

TypeCondition
System.ArgumentOutOfRangeExceptionwindow is less than Zero.

6. Overload

public ReplaySubject(TimeSpan window, IScheduler scheduler)

Summary: Initializes a new instance of the ReplaySubject class with the specified window and scheduler.

Parameters

NameTypeDescription
windowTimeSpanMaximum time length of the replay buffer.
scheduler[IScheduler](#Scheduler the observers are invoked on.

Exceptions

TypeCondition
System.ArgumentNullExceptionscheduler is null.
System.ArgumentOutOfRangeExceptionwindow is less than Zero.

7. Overload

public ReplaySubject(int bufferSize, TimeSpan window)

Summary: Initializes a new instance of the ReplaySubject class with the specified buffer size and window.

Parameters

NameTypeDescription
bufferSizeintMaximum element count of the replay buffer.
windowTimeSpanMaximum time length of the replay buffer.

Exceptions

TypeCondition
System.ArgumentOutOfRangeExceptionbufferSize is less than zero. -or- window is less than Zero.

8. Overload

public ReplaySubject(int bufferSize, TimeSpan window, IScheduler scheduler)

Summary: Initializes a new instance of the ReplaySubject class with the specified buffer size, window and scheduler.

Parameters

NameTypeDescription
bufferSizeintMaximum element count of the replay buffer.
windowTimeSpanMaximum time length of the replay buffer.
scheduler[IScheduler](#Scheduler the observers are invoked on.

Exceptions

TypeCondition
System.ArgumentOutOfRangeExceptionbufferSize is less than zero. -or- window is less than Zero.
System.ArgumentNullExceptionscheduler is null.